Chris Pollett > CS185C
( Print View )

Student Corner:
  [Grades Sec1]
 
  [Submit Sec1]
 
  [
Lecture Notes]

Course Info:
  [Texts & Links]
  [Topics]
  [Grading]
  [HW Info]
  [Exam Info]
  [Regrades]
  [Honesty]
  [Announcements]

HW Assignments:
  [Hw1]  [Hw2]  [Hw3]
  [Hw4]  [Hw5]

Practice Exams:
  [Mid1]  [Mid2]  [Final]

                           












HW#3 --- last modified March 02 2019 17:08:03..

Solution set.

Due date: Mar 26

Files to be submitted:
  Hw3.zip

Purpose: To gain more experience with form programming, drawing on windows, and programming tables.

Specification:

You should only include your headers/source/resource files and Makefile in the zip file you submit. The command "make all" will be used to compile your program and "make clean" should get rid of the compiled files. For this project your goal is to make a program that could be the interface for a home automation set up. (For people who liked my virtual pet project from previous years, see the bonus points at the end of this description.) The eventual point of this interface would be after we learn about IR, Bluetooth, and 802.11 we could connect (possibly via an intermediary PC) our interface to send X-10 or Z-wave commands to appropriately enabled lights, garage door openers, etc in a house or appartment. Your user interface should have the ability to create new houses, modify existing ones or delete existing ones. The create delete house should be controlled via a menu. This menu should also have a pulldown with an about application and instructions items. You should have at least two main types of forms one with a list to select the house to consider; one used to draw rooms of a house. At least one button on these forms should be used to allow one to switch between these two types of interfaces. For each house you should use a category interface to select a room. You should allow for editing of room names via a modal form as one of the category entries. Somewhere in the handling of adding/editing rooms you should make use of the function FrmDoDialog. Your application should make use of an application info block to store the names of houses currently managed by your device. Your application should use an application preferences struct to preserve the last state of your application if you switch from this application to another one. You should create a struct called RoomRecordType and use this struct to be able to store/retrieve room information into/from a Palm database.

For the forms related to rooms you should draw a bitmap for the room in question. (Does not have to be fancy might just have a rectangle.) Within a room you should be able to place lamps, stereos, thermostats and generic applicances. You should have a bitmap for each of these items and be able to support adding/modifying an item within a room. Each item should have a name and a state. The state can be either on or off or controlled via a slider. Tapping on the item in the room bring up a dialog to control the state as well as allows one to change the name and delete the item. A button can be used to bring up a dialog to initially create a new item of one of these four item types of a given type and to set its location within the room.

Bonus: 3pts if you can incorporate into your home automation project a virtual assistant (Like Microsoft's Clippy) that can help people set up rooms.

Point Breakdown

Departmental coding guidelines for C++ followed 1pt
Create/delete houses in menu, about and instructions in menu 1pts
Two main types of forms as described above with buttons to switch between1pt
Use category interface to select a room 1pt
Modal dialog to edit rooms/room names 1pt
Use of application info block as above1pt
Use of application preferences as describe above1pt
Use of Palm databases as above2pts
Bitmap of room and four item types2pts
Tapping on item within room brings up control dialog2pts
Creating new items for a room as described above2pts
Total15pts